<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>交易明细</title>
<style>
th{text-align:center}
.dataTables_wrapper{
 padding-top: 15px;
}
.date.form_date{
    padding: 5px;
    width: 110px;
}
.date.form_date input[type="text"] {
    width: 75px;
}
</style>
</head>
<body class="nav-md">

	<!-- /top navigation -->

	<!-- page content -->
	<div class="">
		<!--<div class="page-title">-->
			<!--<div class="title_left">-->
				<!--<h3>-->
					<!--交易明细<small></small>-->
				<!--</h3>-->
			<!--</div>-->
		<!--</div>-->

		<div class="clearfix"></div>

		<div class="row">
			<div class="col-md-12 col-sm-12 col-xs-12">
				<div class="x_panel">
					<div class="x_title">
						<h3>交易明细</h3>
						<div class="clearfix"></div>
					</div>
					<div class="x_content">
						<!--<p class="text-muted font-13 m-b-30">交易明细</p>-->

						<ul id="myTab1" class="nav nav-tabs bar_tabs" role="tablist">
							<li role="presentation" class="[#if type==0]active[/#if]"><a
								href="javascript:void(0)"
								onclick="pjaxContent('/trade/tradedetail?type=0')">月订单金额</a></li>
							<li role="presentation" class="[#if type==1]active[/#if]"><a
								href="javascript:void(0)"
								onclick="pjaxContent('/trade/tradedetail?type=1')">订单列表</a></li>
							<li role="presentation" class="[#if type==2]active[/#if]"><a
								href="javascript:void(0)"
								onclick="pjaxContent('/trade/tradedetail?type=2')">支付明细</a></li>
							<li role="presentation" class="[#if type==3]active[/#if]"><a
								href="javascript:void(0)"
								onclick="pjaxContent('/trade/tradedetail?type=3')">各月客单价</a></li>
							<li role="presentation" class="[#if type==4]active[/#if]"><a
								href="javascript:void(0)"
								onclick="pjaxContent('/trade/tradedetail?type=4')">采购金额排名</a></li>
							<li role="presentation" class="[#if type==5]active[/#if]"><a
								href="javascript:void(0)"
								onclick="pjaxContent('/trade/tradedetail?type=5')">供应商订单金额排名</a></li>
						</ul>

						[#if type < 4]
						<!-- 时间 -->
						<div style="display: inline-block;float: left;">
							<label id="labelTimeName"   style="padding-top:8px;padding-right:10px">[#if type==0 || type == 3]月份[#elseif type==1]订单时间[#else]支付时间[/#if]</label>
							<div class="controls input-append date form_date" data-date=""
								data-date-format="dd MM" data-link-field="dtp_input1"
								data-link-format="yyyy-mm" style="margin-right: 3px;">
								<span class="add-on"><i class="icon-th"></i></span> <input id="so_startTime" name="so_startTime"
									id="dtp_input1Hm1" size="16" type="text" value="[#if so_startTime??]${so_startTime!}[/#if]" readonly>
							</div>
							— 
							<div class="controls input-append date form_date" data-date=""
								data-date-format="dd MM" data-link-field="dtp_input2"
								data-link-format="yyyy-mm">
								<span class="add-on"><i class="icon-th"></i></span> <input id="so_endTime" name="so_endTime"
									id="dtp_input1Hm2" size="16" type="text" value="[#if so_endTime??]${so_endTime!}[/#if]" readonly>
							</div>
						</div>
						[/#if]
						
						[#if type==1]
						<!-- 下拉选择 -->
						<div  class="col-xs-3">
							<label class="control-label"  style="padding-top:8px">订单类别：</label>
							<div style="padding-left: 0px;display: inline-block;">
								<select class="form-control" name="so_select" id="so_select"">
								[#if type==1]
									<option value=''>全部</option>
									<option [#if so_select ?? && so_select==0] selected='selected'[/#if] value='1'>商城订单</option>
									<option [#if so_select ?? &&  so_select==1] selected='selected'[/#if] value='2'>项目订单</option>
								[/#if]
								</select>
							</div>
						</div>
						[/#if] 
						
							[#if type==1 || type==2 || type==4 || type==5]
						<!-- 搜索 -->
						<div style="padding-left: 0px;display: inline-block;">
						<label class="control-label" style="padding-top:8px">[#if type < 4]订单号[#elseif type == 4]采购商[#else]供应商[/#if]：</label>
							<div class="input-group" style="display: inline-block; vertical-align: middle;width: 150px;">
								<input name="so_search" id="so_search" value="[#if so_search??]${so_search!}[/#if]" class="form-control" type="text" placeholder="[#if type < 4]订单号[#elseif type == 4]采购商[#else]供应商[/#if]"> <span
									class="input-group-btn">
								</span>
							</div>
						</div>
						[/#if] 
						<div style="float:right;display: inline-block;">
						<div class="form-group" style="text-align: right;">
						<button type="button" onclick="search();" class="btn btn-primary">搜索</button>
							<button type="button" onclick="reset();" class="btn btn-danger">重置</button>
                          <button type="submit" id="outexcel" onclick="exportTradeListExcel();" class="btn btn-success">导出EXCEL</button>
                        </div>
						</div>
						<input type="hidden" id="type" value="${type!}">
						<table id="datatable" class="table table-striped table-bordered">
							<thead>
								[#if type==0]
								<tr>
									<th>订单总金额</th>
									<th>订单总数量</th>
									<th>月份</th>
								</tr>
								[/#if] 
								[#if type==1]
								<tr>
									<th>订单号</th>
									<th>采购商</th>
									<th>供应商</th>
									<th>订单金额</th>
									<th>订单产品数量</th>
									<th>是否分批支付</th>
									<th>是否分批发货</th>
									<th>订单类别</th>
									<th>订单时间</th>
									<th>订单状态</th>
								</tr>
								[/#if] 
								[#if type==2]
								<tr>
								    <th>订单号</th>
									<th>支付流水号</th>
									<th>支付批次</th>
									<th>应付金额</th>
									<th>实付金额</th>
									<th>支付安装币</th>
									<th>支付方式</th>
									<th>支付时间</th>
									<th>支付结果</th>
									<th>审核状态</th>
								</tr>
								[/#if]
								[#if type==3]
								<tr>
								    <th>客单价</th>
									<th>月份</th>
								</tr>
								[/#if]
								[#if type==4]
								<tr>
								    <th>序号</th>
								    <th>采购商</th>
									<th>总采购金额</th>
								</tr>
								[/#if]
								[#if type==5]
								<tr>
								    <th>序号</th>
								    <th>供应商</th>
									<th>总订单金额</th>
								</tr>
								[/#if]
							</thead>
						</table>
					</div>
				</div>
			</div>

		</div>
	</div>
	<!-- /page content -->

	<!-- userdataTable -->
	<script src="/res/build/js/trade/tradeDataTables.js"></script>
</body>
</html>